NAND flash memory, as well as other types of non-volatile memories (“NVMs”), are commonly used in electronic device for mass storage. For example, consumer electronics such as portable media players, often include NAND flash memory to store music, videos, and other media programs.
An electronic device can implement a file system to manage the file and folder structure of the device's memory components, such as a NVM. The file system can allocate logical addresses to each file in the NVM. To store or retrieve the file, the file system can issue read or write requests along with the file's logical addresses.
When a file stored in the NVM is no longer needed and is removed from the file system namespace, the file system can de-allocate the associated logical addresses and send an unmap request to the NVM system. If the unmap request is not properly processed by the NVM system, the NVM system may continue to operate as if the logical addresses are still in use. The NVM system will therefore maintain the data that was stored in the file even though this data is no longer needed and will never be requested by the file system. In particular, the NVM system will retain the data during garbage collection and wear leveling operations, which reduces the operating efficiency of the system. It will only be recycled when the particular logical address is overwritten by the contents of another file.